/**
 * Copyright &copy; 2012-2016 <a href="https://github.com/thinkgem/jeesite">JeeSite</a> All rights reserved.
 */
package com.thinkgem.jeesite.modules.guobo.entity;

import java.util.Date;
import java.util.List;

import org.hibernate.validator.constraints.Length;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.thinkgem.jeesite.common.persistence.DataEntity;

/**
 * 预警规则Entity
 * @author wudavid
 * @version 2017-03-09
 */
public class WarningRole extends DataEntity<WarningRole> {
	
	private static final long serialVersionUID = 1L;
	private String name;		// 规则名称
	private String status;		// 状态,00未布防,01已经布防
	private Date startdate;		// 规则开始日期
	private Date enddate;		// 规则结束日期
	
	/**
	 * 规则所包含的读写器
	 */
	private List<Rw> rws;
	
	/**
	 * 规则包含的物品
	 */
	private List<Asset> assets;
	
	/**
	 * 读写器id的拼接
	 */
	private String rwIds;
	
	/**
	 * 读写器名称的拼接
	 */
	private String rwNames;
	
	
	public List<Rw> getRws() {
		return rws;
	}

	public void setRws(List<Rw> rws) {
		this.rws = rws;
	}

	public List<Asset> getAssets() {
		return assets;
	}

	public void setAssets(List<Asset> assets) {
		this.assets = assets;
	}

	public String getRwIds() {
		return rwIds;
	}

	public void setRwIds(String rwIds) {
		this.rwIds = rwIds;
	}

	public String getRwNames() {
		return rwNames;
	}

	public void setRwNames(String rwNames) {
		this.rwNames = rwNames;
	}

	public WarningRole() {
		super();
	}

	public WarningRole(String id){
		super(id);
	}

	@Length(min=0, max=64, message="规则名称长度必须介于 0 和 64 之间")
	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}
	
	@Length(min=0, max=2, message="状态长度必须介于 0 和 2 之间")
	public String getStatus() {
		return status;
	}

	public void setStatus(String status) {
		this.status = status;
	}
	
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	public Date getStartdate() {
		return startdate;
	}

	public void setStartdate(Date startdate) {
		this.startdate = startdate;
	}
	
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	public Date getEnddate() {
		return enddate;
	}

	public void setEnddate(Date enddate) {
		this.enddate = enddate;
	}
	
}